package com.syas.web.controllers;

import com.syas.service.interfaces.IAmortcoetServcie;
import com.syas.web.auth.AuthPassport;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import javax.servlet.http.HttpServletRequest;

/**
 * Created by weigong on 2015/12/5.
 */
@Controller
@RequestMapping(value = "/amortcoet")
public class AmortcoetController extends BaseController {


    @Autowired
    @Qualifier("AmortcoetServcie")
    private IAmortcoetServcie amortcoetService;

    @AuthPassport
    @RequestMapping(value="/amortcoetList", method = {RequestMethod.GET})
    public String amortcoetList(HttpServletRequest request, Model model){
        model.addAttribute("amortcoetList",amortcoetService.getAmortcoetList());
        model.addAttribute("requestUrl", request.getServletPath());
        model.addAttribute("requestQuery", request.getQueryString());
        return "amortcoet/amortcoetList";
    }




}
